GetControlValue
Definition:
GetControlValue(control)
Description:
Obtain the current value of a control.
Platforms:
All
Parameters:
control - required
Name of the control.
Returns:
String containing the current value of the control – see Notes below – or an empty string, "", if the control is empty.
Notes:
-
The value returned depends upon the type of control:
Edit Control, Static Text - The text displayed in the control.
Combo Box
Dropdown Combo - The currently displayed value in the Edit Box.
Droplist Combo - Text of the currently selected item.
ListView Control - The value of the first control in the currently selected row. (Note that when viewing a Template in the Forms Pane tree within App Studio, by default the Panel defining the boundaries of the row appears as the first control listed. This control is ignored by GetControlValue when determining the first control in the row.)
List Box - Returns the currently selected item or an empty string, "", if no item selected.
Radio Button, Check Box -
True, "True", 1 or "1" indicates checked.
False, "False", 0 or "0" indicates unchecked.
Date Picker - Returns a string containing the date and time in the following UK date/time format:
21-02-2012 15:30:45
The reliability of the date and time segments of the value returned depends upon the Format Property setting of the control. If set to Long Date or Short Date only the Date segment of the return value should be treated as valid, the time segment can contain any time value. If set to Time only the time segment should be considered valid; although the date segment is most likely to contain the current date set on the device this cannot be guaranteed.
Buttons - The button's label text.
Timer - The timer interval in milliseconds.
Slider Control, Progress Control - The current numerical value as a string.
Panel Control - Empty string.
-
If you have used input Data Conversion to modify the value displayed in a control, the value returned here will be the converted value displayed in the control and not the original input value.